# -*- coding:utf8 -*-
# !/usr/bin/python
'''
author: ning.luo
createTime: 2022/1/23 23:12
update: ning.luo
updateTime: 2022/1/23 23:12
description: 文件简介描述
'''
import subprocess

from logger import logger


class HandleCommon:
    """
    公共方法
    """

    def allure_report(self, report_path, report_html):
        # 执行命令 allure generate
        allure_cmd = "allure generate %s -o %s --clean" % (report_path, report_html)
        try:
            subprocess.call(allure_cmd, shell=True)
            logger.info("生成测试报告")
        except:
            logger.error("生成测试报告出错")
            raise


if __name__ == '__main__':
    pass